async function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
}

export async function vLoad(result = [], sleepTimes = 500) {
    return sleep(sleepTimes).then(
        () => new Promise((resolve, reject) => result ? resolve(result) : reject())
    );
}
